#ifndef HUD_ITEM_CANNON_H
#define HUD_ITEM_CANNON_H

#include "consts.h"
#include "cash.h"

class HUD_ITEM_CANNON : public QObject, public QGraphicsItemGroup
{
    Q_OBJECT
private:
    GRAPHICS_PIXMAP_ITEM *cannon_icon;
    GRAPHICS_PIXMAP_ITEM *cannon_border;

    QList<QGraphicsItemAnimation*> *lst_anims;

    QTimeLine *tl_anim_decor;
    QTimeLine *tl_anim_items;

    QTimeLine *tl_increment;

    QGraphicsDropShadowEffect *hud_shadow;

    int points;

    CASH *cash;

public:
    HUD_ITEM_CANNON(CASH *cash);

    QPainterPath shape() const;

    void init();
    void init_decor();

    void set_points(int value);
    int get_points();

    ~HUD_ITEM_CANNON();

public slots:
    void show_hud();
    void hide_hud();

    void slot_hide_items();
    void slot_show_items();

    void slot_fire();
    void slot_tl_increment();

};

#endif // HUD_ITEM_CANNON_H
